from dao.iothelper import Iot

#区县 W2JYdFY8F，站点 kqjczddt
# 查询某个租户下所有产品所有设备最近的数据记录，第一个入参为查询字段
def search():
    rs=Iot()
    rs.get_multi_dev_data('pm,o3','U0006','W2JYdFY8F')
    # rs.get_multi_dev_data('pm25,o3','U0006','kqjczddt')

# 删除某个租户下所有产品某些字段在多少小时之内的数据
def dml_HoursData(tenantid,product,Field,hours):
    rs = Iot()
    rs.dml_dev_data(tenantid,product,Field,hours)



# dml_HoursData('U0006','W2JYdFY8F','pm',48)
# dml_HoursData('U0006','W2JYdFY8F','o3',48)

# dml_HoursData('U0006','kqjczddt','pm25',6)
# dml_HoursData('U0006','kqjczddt','o3',6)
search()